package cn.cdqf.service.impl;

import cn.cdqf.bean.Statistics;
import cn.cdqf.bean.TEmp;
import cn.cdqf.mapper.EmpMapper;
import cn.cdqf.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmpServiceImpl implements EmpService {

    @Autowired
    private EmpMapper empMapper;

    @Override
    public TEmp login(String no, String pass) {
        return empMapper.login(no,pass);
    }

    @Override
    public int addEmp(TEmp tEmp) {
        return empMapper.addEmp(tEmp);
    }

    @Override
    public List<TEmp> queryEmp() {
        return empMapper.queryEmp();
    }

    @Override
    public List<Statistics> getStatistics() {
        return empMapper.getStatistics();
    }

    @Override
    public int deleteEmp(int parseInt) {
        return empMapper.deleteEmp(parseInt);
    }

    @Override
    public TEmp queryEmpById(int parseInt) {
        return empMapper.queryEmpById(parseInt);
    }

    @Override
    public int updateEmp(TEmp tEmp, Integer id) {
        return empMapper.updateEmp(tEmp,id);
    }

    @Override
    public int updateEmpPass(String pass, long id) {
        return empMapper.updateEmpPass(pass,id);
    }
}
